# @file    : assistants_test
# @time    : 2025/3/24
# @author  : yongpeng.yao
# @desc    :
import os

from dashscope import Assistants
from dotenv import load_dotenv

load_dotenv()

assistant = Assistants.create(
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    model='qwen-plus',
    name='鲜花价格计算器',
    instructions='你能帮我计算鲜花的价格',
    tools=[
        {'type': 'code_interpreter'}
    ],
)
print(assistant)
result = {'tools': [{'type': 'code_interpreter'}], 'id': 'asst_4d40b28d-3305-4b83-b982-6da0952f0af1',
          'object': 'assistant', 'created_at': 1742885628988, 'model': 'deepseek-r1', 'name': '鲜花价格计算器',
          'description': '', 'instructions': '你能帮我计算鲜花的价格', 'file_ids': [], 'metadata': {},
          'temperature': None, 'top_p': None, 'top_k': None, 'max_tokens': None, 'endpoint': None,
          'request_id': '90390f2f-7cba-996c-a24b-1d69ac94bdd7', 'status_code': 200}

# assistants = Assistants.update('asst_4d40b28d-3305-4b83-b982-6da0952f0af1', model='qwen-plus')
